package org.jeecg.modules.assist;

/**
 * Created by ZJL on 2019/9/17.
 */
public class PageAssist {
    private static int pageNo;
    private static int pageSize;
    private static int end;

    public static int getEnd() {
        return end;
    }

    public static void setEnd(int end) {
        PageAssist.end = end;
    }

    public PageAssist(){};

    public static int getPageNo() {
        return pageNo;
    }

    public static void setPageNo(int pageNo) {
        PageAssist.pageNo = pageNo;
    }

    public static int getPageSize() {
        return pageSize;
    }

    public static void setPageSize(int pageSize) {
        PageAssist.pageSize = pageSize;
    }

    public PageAssist(int pageNo, int pageSize){
        this.pageNo=pageNo;
        this.pageSize=pageSize;
    }
    public void setPage (int upage){
        if(upage==1){
            this.pageNo=0;
        }
        else{
            this.pageNo=pageSize*(upage-1);
        }
        this.end=pageNo+pageSize;
    }
}
